#ifndef CLIPBOARDMODEL_H
#define CLIPBOARDMODEL_H

// includes
#include <QtCore/QtGlobal>
#include <QtCore/QAbstractListModel>

// forward declarations
class QClipboard;
class MegaClipboardModelPrivate;

// class declaration
class MegaClipboardModel
	: public QAbstractListModel
{
	Q_OBJECT
	Q_DISABLE_COPY(MegaClipboardModel)
public:
	explicit MegaClipboardModel(QObject *parent = 0);
	virtual ~MegaClipboardModel();

	enum Roles { ClipCaptionRole = Qt::UserRole + 1, ClipDataRole = Qt::UserRole + 2 };

public:
	// QAbstractListModel implementation
	virtual int rowCount(const QModelIndex & _parent) const;
	virtual QVariant data(const QModelIndex & _index, int _role) const;
	virtual QVariant headerData(int _section, Qt::Orientation _orientation, int _role) const;
	virtual bool removeRows(int _row, int _count, const QModelIndex & _parent);

public:
	bool activate(int _index);

private:
	MegaClipboardModelPrivate * const d_ptr;
	Q_DECLARE_PRIVATE(MegaClipboardModel)
	Q_PRIVATE_SLOT(d_func(), void _q_updateClipboard())
};

#endif // CLIPBOARDMODEL_H
